class HistoryModel {
  int id;
  String licensePlate;
  int company;
  int stationId;
  String categoryId;
  String beginDate;
  String headerNo;
  String carriageNo;
  String carStatus;
  String driverId;
  Null inDate;
  Null upDate;
  String inUser;
  String upUser;
  String delFlag;

  HistoryModel(
      {this.id,
        this.licensePlate,
        this.company,
        this.stationId,
        this.categoryId,
        this.beginDate,
        this.headerNo,
        this.carriageNo,
        this.carStatus,
        this.driverId,
        this.inDate,
        this.upDate,
        this.inUser,
        this.upUser,
        this.delFlag});

  HistoryModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    licensePlate = json['licensePlate'];
    company = json['company'];
    stationId = json['stationId'];
    categoryId = json['categoryId'];
    beginDate = json['beginDate'];
    headerNo = json['headerNo'];
    carriageNo = json['carriageNo'];
    carStatus = json['carStatus'];
    driverId = json['driverId'];
    inDate = json['inDate'];
    upDate = json['upDate'];
    inUser = json['inUser'];
    upUser = json['upUser'];
    delFlag = json['delFlag'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['licensePlate'] = this.licensePlate;
    data['company'] = this.company;
    data['stationId'] = this.stationId;
    data['categoryId'] = this.categoryId;
    data['beginDate'] = this.beginDate;
    data['headerNo'] = this.headerNo;
    data['carriageNo'] = this.carriageNo;
    data['carStatus'] = this.carStatus;
    data['driverId'] = this.driverId;
    data['inDate'] = this.inDate;
    data['upDate'] = this.upDate;
    data['inUser'] = this.inUser;
    data['upUser'] = this.upUser;
    data['delFlag'] = this.delFlag;
    return data;
  }
}

class HistoryListModel{
  List<HistoryModel> resultList;

  HistoryListModel.fromJson(List<dynamic> json) {
    if (json != null) {
      resultList = new List<HistoryModel>();
      json.forEach((v) {
        resultList.add(new HistoryModel.fromJson(v));
      });
    }
  }

  List<dynamic> toJson() {
    final List<dynamic> data = new List<dynamic>();
    if (this.resultList != null) {
      data.addAll(this.resultList.map((v) => v.toJson()).toList());
    }
    return data;
  }
}